from enum import Enum

"""
    指令飞行相关的方法枚举
"""
class RemoteControlMethodEnum(Enum):
    DRONE_CAMERA_OSD_INFO_PUSH = "drc_camera_osd_info_push"  # 摄像头 osd 推送
    DRONE_STATE_PUSH = "drc_drone_state_push"    # 飞行器状态信息上报
    CAMERA_STATE_PUSH = "drc_camera_state_push"  # 相机状态上报
    CAMERA_PHOTO_INFO_PUSH = "drc_camera_photo_info_push"   # 拍照信息上报
    HEART_BEAT = "heart_beat"     # DRC-心跳
    INITIAL_STATE_SUBSCRIBE = "drc_initial_state_subscribe"  # DRC初始状态订阅
    DRONE_EMERGENCY_STOP = "drone_emergency_stop"  # DRC-飞行器急停
    DRONE_CONTROL = "drone_control"   # DRC-飞行控制
    CAMERA_DEWARPING_SET = "drc_camera_dewarping_set" # 负载控制—镜头去畸变
    CAMERA_MECHANICAL_SHUTTER_SET = "drc_camera_mechanical_shutter_set" # 负载控制—机械快门
    CAMERA_ISO_SET = "drc_camera_iso_set"  # 负载控制—ISO设置
    CAMERA_SHUTTER_SET = "drc_camera_shutter_set"  # 负载控制—相机快门
    CAMERA_APERTURE_VALUE_SET = "drc_camera_aperture_value_set"  # 负载控制—相机光圈
    STEALTH_MODE_SET = "drc_stealth_state_set"  # 飞行控制—隐蔽模式
    NIGHT_LIGHTS_STATE_SET = "drc_night_lights_state_set"  # 夜航灯设置
    INTERVAL_PHOTO_SET = "drc_interval_photo_set"   # 负载控制—设置定时拍照
    PHOTO_STORAGE_SET = "drc_photo_storage_set"  # 负载控制—照片存储设置
    VIDEO_STORAGE_SET = "drc_video_storage_set"  # 负载控制—视频存储设置
    VIDEO_RESOLUTION_SET = "drc_video_resolution_set"  # 负载控制—视频分辨率设置
    LINKAGE_ZOOM_SET = "drc_linkage_zoom_set"  # 负载控制—红外联动变焦
    EMERGENCY_LANDING = "drc_emergency_landing"  # 紧急降落
    FORCE_LANDING = "drc_force_landing"  # 强制降落
    CAMERA_MODE_SWITCH = "drc_camera_mode_switch"  # 负载控制—切换相机模式
    CAMERA_RECORDING_START = "drc_camera_recording_start"  # 负载控制—开始录像
    CAMERA_RECORDING_STOP = "drc_camera_recording_stop"  # 负载控制—停止录像
    CAMERA_SCREEN_DRAG = "drc_camera_screen_drag"  # 负载控制—画面拖动控制
    CAMERA_AIM = "drc_camera_aim"  # 负载控制—双击成为 AIM
    CAMERA_FOCAL_LENGTH_SET = "drc_camera_focal_length_set"  # 负载控制—变焦
    GIMBAL_RESET = "drc_gimbal_reset"  # 负载控制—重置云台
    CAMERA_LOOK_AT = "drc_camera_look_at"  # 负载控制—Look At
    CAMERA_SCREEN_SPLIT = "drc_camera_screen_split"  # 负载控制—分屏
    CAMERA_FRAME_ZOOM = "drc_camera_frame_zoom"  # 负载控制—框选变焦
    IR_METERING_AREA_SET = "drc_ir_metering_area_set"  # 负载控制—红外测温区域设置
    IR_METERING_POINT_SET = "drc_ir_metering_point_set"  # 负载控制—红外测温点设置
    IR_METERING_MODE_SET = "drc_ir_metering_mode_set"  # 负载控制—红外测温模式设置
    CAMERA_POINT_FOCUS_ACTION = "drc_camera_point_focus_action"  # 负载控制—点对焦
    CAMERA_FOCUS_VALUE_SET = "drc_camera_focus_value_set"  # 负载控制—相机对焦值设置
    CAMERA_FOCUS_MODE_SET = "drc_camera_focus_mode_set"  # 负载控制—相机对焦模式设置
    CAMERA_EXPOSURE_SET = "drc_camera_exposure_set"  # 负载控制—相机曝光值调节
    CAMERA_EXPOSURE_MODE_SET = "drc_camera_exposure_mode_set"  # 负载控制—相机曝光模式设置
    CAMERA_PHOTO_STOP = "drc_camera_photo_stop"  # 负载控制—停止拍照
    CAMERA_PHOTO_TAKE = "drc_camera_photo_take"  # 负载控制—开始拍照

    # 获取 method 字段
    def get_method(self):
        return self.value

# 示例用法
if __name__ == "__main__":
    # 获取某个枚举的值
    print(RemoteControlMethodEnum.DRONE_CAMERA_OSD_INFO_PUSH.get_method())  # 输出: drc_camera_osd_info_push

    # 遍历枚举项
    for method in RemoteControlMethodEnum:
        print(method.name, method.value)
